use Irssi;
use vars qw($VERSION %IRSSI);

$VERSION = "0.1";

%IRSSI = (
    authors     => 'Tom Laermans (SiD3WiNDR)',
    contact     => 'sid3windr@sid3windr.be',
    name        => 'active-invite',
    description => 'Shows invitation messages in active window',
    license     => 'GPL',
    url         => 'http://www.codemonkey.be',
);

sub invite_move{

  my ($server, $channel, $nick) = @_;

  my $awin = Irssi::active_win();
  $awin->print("[%W-%n] %W$nick%n invites you to join %W$channel%n.", MSGLEVEL_NOTICES);
  Irssi::signal_stop();
}

Irssi::signal_add('message invite', 'invite_move');
